<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改竞赛获奖')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-competition-edit" th:object="${stuCompetition}">
            <input name="comId" th:field="*{comId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">学号：</label>
                <div class="col-sm-8">
                    <input name="stuNumber" th:field="*{stuNumber}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">竞赛名称：</label>
                <div class="col-sm-8">
                    <input name="comName" th:field="*{comName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">发布机构：</label>
                <div class="col-sm-8">
                    <input name="comInstitution" th:field="*{comInstitution}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">颁布时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="comGettime" th:value="${#dates.format(stuCompetition.comGettime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">作品名：</label>
                <div class="col-sm-8">
                    <input name="comCreationname" th:field="*{comCreationname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">奖项级别：</label>
                <div class="col-sm-8">
                    <input name="comSize" th:field="*{comSize}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">奖项等级：</label>
                <div class="col-sm-8">
                    <input name="comLevel" th:field="*{comLevel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">获奖对象：</label>
                <div class="col-sm-8">
                    <input name="comObject" th:field="*{comObject}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">团队排名：</label>
                <div class="col-sm-8">
                    <input name="teamRanking" th:field="*{teamRanking}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">指导老师：</label>
                <div class="col-sm-8">
                    <input name="comInstructor" th:field="*{comInstructor}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/competition";
        $("#form-competition-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-competition-edit').serialize());
            }
        }

        $("input[name='comGettime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>